Page 88 - 2629_Devagiri_C-7
P. 88

FLOW OF CONTROL

                        6                                  IN PYTHON








                  PRIMARY PREVIEW

                     Python Statements-Flow of Control
                     Python Selection Statements
                     Ternary Operator in Python
                     Some More Programs






















                           Hey AIRO, how does a computer make decisions?




                                                    The computer uses conditional statements to check if
                                                  something is true or false and then decides what to do.



                           So, it’s like asking a question
                           and doing something if it’s true?



                                                                         Exactly! Loops help the computer
                                                                   repeat actions until a condition is met.






                           So, loops make the computer repeat tasks?



                                                                 Yes! We will explore both in this chapter.





                   86
                        Premium Edition-VII
   83   84   85   86   87   88   89   90   91   92   93